﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using Meteo.Desktop;
using System.Text;
using System.Windows.Forms;
using GPS;


namespace Cartography.Desktop
{
    public partial class ConfGen : Form
    {
        public ConfGen()
        {
            InitializeComponent();
        }

        public NumericUpDown GpsNumeric
        {
            get
            {
                return this.gpsInterTime;
            }
        }

        public NumericUpDown MeteoNumeric
        {
            get
            {
                return this.meteoInterTime;
            }
        }


        private void cancButton_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void okButton_Click(object sender, EventArgs e)
        {
            int gpsTime = (int) this.gpsInterTime.Value;
            int meteoTime = (int) this.meteoInterTime.Value;

            Console.Write("GPS Time = " + gpsTime);
            Console.Write("Meteo Time = " + meteoTime);

            GPSService.UpdateTime = gpsTime;
            MeteoService.UpdateTime = meteoTime;
            this.Dispose();
        }
    }
}
